<template>
  <div class="guide-list">
    <mt-header title="全部导游" fixed>
      <router-link to slot="left">
        <mt-button icon="back" @click="$router.go(-1)"></mt-button>
      </router-link>
      <!-- <mt-button icon="more" slot="right"></mt-button> -->
    </mt-header>
    <div class="guide-content" v-for="(item, index) in guideList" :key="index">
      <router-link :to="'/personal/' + item.id + '/read'">
        <my-guide :guide="item"></my-guide>
      </router-link>
    </div>
  </div>
</template>

<script>
import { fetchGetData, fetchPostData } from "@/api/fetch.js";
export default {
  name: "guide-list",
  data() {
    return {
      guideList: []
    };
  },
  props: [],
  mounted() {
    fetchPostData("/api/user/list", {
      isGuide: "1"
    }).then(data => {
      if (data.status == 1) {
        this.guideList = data.data.rows;
        console.log(this.guideList);
      } else {
        console.log("fail");
      }
    });
  }
};
</script>

<style lang="stylus" scoped>
.guide-list {
  padding-top: 40px;
  background-color #efefef;
  height 100%;

  .mint-header.is-fixed {
    z-index: 999;
  }
}
</style>